From 8ce533265ed7acbf9031c7ba4120a2932444a802 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 26 Mar 2011 14:49:24 +0100 Subject: [PATCH] gtk: Reset children styles when changing name Changing the name of a widget does not just change the current widget's path, but also the path of all its children. --- gtk/gtkwidget.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 714f850b1b..ab66dd571a 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6920,17 +6920,7 @@ gtk_widget_set_name (GtkWidget *widget, g_free (priv->name); priv->name = new_name; - if (priv->path) - { - guint pos; - - pos = gtk_widget_path_length (priv->path) - 1; - gtk_widget_path_iter_set_name (priv->path, pos, - priv->name); - } - - if (priv->context) - gtk_style_context_set_path (priv->context, priv->path); + gtk_widget_reset_style (widget); g_object_notify (G_OBJECT (widget), "name"); } -- 2.30.2